package com.gxwy.changyongzhanghu.service;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gxwy.changyongzhanghu.dao.ChangYongZhangHuDao;
import com.gxwy.changyongzhanghu.form.ChangYongZhangHu;

@Service
public class ChangYongZhangHuServiceImpl implements ChangYongZhangHuService {

	@Autowired
	private ChangYongZhangHuDao dao;
	
	@Transactional
	public List<ChangYongZhangHu> findAll() {
		return dao.findAll();
	}

	@Transactional
	public ChangYongZhangHu findByShouKuanZhangHao(String skzh) {
		return dao.findByShouKuanZhangHao(skzh);
	}

	@Transactional
	public void addContact(ChangYongZhangHu contact) {
	         dao.AddChangYongZhangHu(contact);
	}
	@Transactional
	public void Update(ChangYongZhangHu contact,Integer id) {
		// TODO Auto-generated method stub
		 dao.Update(contact,id);
	}
	@Transactional
	public void Delete(Integer id) {
		// TODO Auto-generated method stub
		  dao.Delete(id);
	}
	@Transactional
	public List<ChangYongZhangHu> SelectId(Integer id) {
		return dao.SelectId(id);
	}


}
